package com.neuedu.redis.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 项目 data-redis-springboot
 *
 * @author 张金山
 * @version 1.0
 * 说明
 * @date 2021/6/4 13:46
 */
@Configuration
public class RedisWebMVCConfiger  implements WebMvcConfigurer {

    @Autowired
    ValidateLoginInteceptor validateLoginInteceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(validateLoginInteceptor)
                .addPathPatterns("/**").
                excludePathPatterns(
                        "/umsUser/token"
                );
    }
}
